#ifndef HTMLIF_H
#define HTMLIF_H

#include "namespace.h"

class Body;
class Template;

class HtmlIf : public Namespace
{
public:
    HtmlIf(Node* expr, Body* body, HtmlIf* elseClause, const YYLTYPE& loc);

    Node* expr() const { return m_expr; }
    Body* body() const { return m_body; }    
    HtmlIf* elseClause() const { return m_else; }

    Template* bodyTemplate() const { return m_bodyTemplate; }
    void setBodyTemplate( Template* t );

    virtual void resolveAll();
    virtual Node* getEntry( const QString& name );
private:
    Node* m_expr;
    Body* m_body;
    HtmlIf* m_else;
    Template* m_bodyTemplate;
};

#endif // HTMLIF_H
